ID Property (Folder Object)
The ID
property returns the unique identifier of this Folder object as a string.
Read-only.
Syntax
objFolder.ID
Data Type
String
Remarks
MAPI systems
assign a permanent, unique identifier string when an object is created. These
identifiers do not change from one MAPI session to another.
The ID
property corresponds to the MAPI property PR_ENTRYID, converted to a string of
hexadecimal characters.
Example
' save the current ID and restore using
Session.GetFolder
'
fragment from Session_Inbox
Set
objFolder = objSession.Inbox
'
fragment from Folder_FolderID
strFolderID = objFolder.ID
MsgBox
"Current Folder ID = " & strFolderID
' can
later restore using objSession.GetFolder(strFolderID)
' fragment from Session_GetFolder
If
"" = strFolderID Then
MsgBox
("Must first set folder ID variable; see Folder->ID")
Exit
Function
End If
Set
objFolder = objSession.GetFolder(strFolderID)
' error
checking here...
See Also
Folders Property (Folder Object), GetFolder Method (Session Object)